
#ifndef POMODOROTIMER_H
#define POMODOROTIMER_H

#include <QMainWindow>
#include <QTimer>
#include <QTime>
#include <QFile>
#include <QDir>

namespace Ui {
class PomodoroTimer;
}

class PomodoroTimer : public QMainWindow
{
    Q_OBJECT

public:
    explicit PomodoroTimer(QWidget *parent = nullptr);
    ~PomodoroTimer();

private slots:
    void on_startStopButton_clicked();
    void on_pauseButton_clicked();
    void on_submitButton_clicked();
    void updateTimer();
    QString formatTimeDiff(const QTime &start, const QTime &end);


private:
    Ui::PomodoroTimer *ui;
    QTimer *timer;
    QTime remainingTime;
    QTime startTime;
    QTime stopTime;
    bool isRunning;
    bool isPaused;
    void saveTaskLog();
    void resetUI();

    QIcon appIcon;
};

#endif // POMODOROTIMER_H
